package com.iran.flyWeight;

public class MainTest {

    public static void main(String[] args) {

        int extrinsicState = 20;

        FlyWeightFactory flyWeightFactory = new FlyWeightFactory();
        FlyWeight a = flyWeightFactory.getFlyWeight("A");

        a.operation(--extrinsicState);

        FlyWeight b = flyWeightFactory.getFlyWeight("B");

        b.operation(--extrinsicState);
        FlyWeight c = flyWeightFactory.getFlyWeight("C");

        b.operation(--extrinsicState);

    }
}
